//
//  KDVPNPage.m
//  KDExample
//
//  Created by YeQing on 2017/3/8.
//  Copyright © 2017年 naruto. All rights reserved.
//

#import "KDVPNPage.h"
#import "KDVPNStore.h"

@interface KDVPNPage ()
@property (nonatomic, strong) KDVPNStore                *vpnStore;
@end

@implementation KDVPNPage
#pragma mark - system
+(void)load
{
    [kNBCURLRouterInstance registerScheme:@"KDVPNPage" scheme:@"vpnpage"];
}
- (void)viewDidLoad
{
    [super viewDidLoad];
    [self.navigationItem setTitle:self.nbcRouterParams[@"name"]];
    self.view.backgroundColor = [UIColor whiteColor];
    _vpnStore = [KDVPNStore new];
}

-(void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    [self.vpnStore startVPN];
}
-(void)viewDidDisappear:(BOOL)animated
{
    [super viewDidDisappear:animated];
    [self.vpnStore stopVPN];
}
-(void)dealloc
{
    BCLogDealloc();
    _vpnStore = nil;
}

@end
